package mutsumimod.powers;

import com.evacipated.cardcrawl.mod.stslib.powers.interfaces.OnReceivePowerPower;
import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.powers.AbstractPower;

import static mutsumimod.MutsumiMod.makeID;

public class AntiArtifactPower extends BasePower implements OnReceivePowerPower {
    public static final String POWER_ID = makeID(AntiArtifactPower.class.getSimpleName());

    public AntiArtifactPower(AbstractCreature owner, int amount) {
        super(POWER_ID, PowerType.DEBUFF, false, owner, amount);
    }

    @Override
    public boolean onReceivePower(AbstractPower abstractPower, AbstractCreature abstractCreature, AbstractCreature abstractCreature1) {
        if(abstractPower.type.equals(AbstractPower.PowerType.BUFF)) {
            reducePowerAndRemove();
            return false;
        }
        return true;
    }

    @Override
    public void updateDescription() {
        this.description = DESCRIPTIONS[0] + this.amount + DESCRIPTIONS[1];
    }

}
